﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace YahtzeeAspTest.Model
{
    public class Player
    {
        public string Name { get; set; }
        public int Score { get; set; }
        public ScoreTable Sheet{ get; set; }
        public bool IsWinner { get; set; }
        public int throwingLeft { get; set; }
        public bool alreadyDoAChoose { get; set; }
        
        public Player(string name)
        {
            alreadyDoAChoose = false;
            Name = name;
            throwingLeft = 0 ;
            Score = 0;
        }

        public bool canIThrowAgainADice()
        {
            if (throwingLeft<2)
            {
                throwingLeft++;
                return true;
            } else 
            {
                throwingLeft = 0;
                return false;           
            }        
        }        
    }
}